package xin.core.jpa.model;

import xin.core.jpa.JpaConstant;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.persistence.Cacheable;
import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.persistence.OrderBy;

@MappedSuperclass
@Cacheable
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true, of = {})
public abstract class SimpleUUIDSortableEntity extends SimpleUUIDEntity {

	@OrderBy("priority asc")
	@Column(length = JpaConstant.PriorityColumnLength)
	protected Integer priority;
}
